<template>
	<view>
		<view>
			<view class="dynamic">
				<view class="user__container">
					<view class="user__header-warp">
						<!-- 头像组 -->
						<view class="user__header" @click="clickUser()">
							<image class="user__header-image" :src="`/gongyi/common/download?name=${item.avatar}`"
								mode="aspectFill"></image>
						</view>
					</view>
					<view class="user__content">
						<view class="user__content-main">
							<text class="user__content-title uni-ellipsis"
								@click.stop="clickUser()">{{item.nickname}}</text>
							<!-- <text class="user__content-note uni-ellipsis">撒娇哦赔付</text> -->
						</view>
						<view class="user__content-extra">

						</view>
					</view>
				</view>

				<view class="wb_hide_2">{{item.textMessage}}</view>
				<view class="allImage">
					<view class="imgList">
						<view class="images">
							<image class="oneimg" v-if="item.pictureUrl"
								:src="`/gongyi/common/download?name=${item.pictureUrl}`" mode="aspectFill"></image>
							<!-- <image class="oneimg" src="../../static/fonts/3.png" mode="aspectFill" ></image> -->
						</view>
					</view>
					<view class="bottom-line"></view>
				</view>
			</view>

			<uni-fab horizontal="right" vertical="bottom" @fabClick="clickTo"></uni-fab>
		</view>
		<!-- 评论区 -->
		<comment-eg :articleId="'article2'" :shareId="this.Id"></comment-eg>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: {},
				Id: '',
				userInfo: {},
			}
		},
		onLoad: function(option) {
			this.Id = option.shareId;
			console.log(this.Id);

		},
		mounted() {
			this.getShareMessage();
			this.userInfo = uni.getStorageSync("user");
		},
		methods: {
			getShareMessage() {
				uni.request({
					url: "/gongyi/share/getOneShare?id=" + this.Id,
					method: 'GET',
					success: (res) => {
						this.item = res.data.ShareOneMessage;
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.dynamic {
		width: 100%;
	}

	.allImage {
		display: flex;
		margin-top: 10rpx;
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.imgList {
		margin: 0 3%;
	}

	.images:not(:nth-child(3n)) {
		/* margin-right: 10rpx; */
	}

	.image-1 {
		flex-shrink: 0;
		margin-right: 10px;
		width: 25px;
		height: 25px;
		border-radius: 6px;
		overflow: hidden;
		border: 1px #f5f5f5 solid;
	}


	.images {
		margin-right: 10rpx;
		display: inline-block;

		.oneimg {
			height: 300rpx;
			width: 300rpx;
			margin-right: 10rpx;
			display: inline-block;
		}
	}

	.bottom-line {
		border-bottom: 10px solid #efefef;
	}


	.user__container {
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		/* -webkit-flex-direction: row; */
		flex-direction: row;
		-webkit-box-flex: 1;
		/* -webkit-flex: 1; */
		flex: 1;
		padding: 10px 15px;
		position: relative;
		overflow: hidden;
	}

	.user__header {
		display: flex;
		width: 45px;
		height: 45px;
		-webkit-border-radius: 5px;
		border-color: #eee;
		border-width: 1px;
		border-style: solid;
		overflow: hidden;
		border-radius: 50px;
	}

	.user__header-image {
		display: flex;
		align-content: center;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		flex-direction: row;
		-webkit-box-pack: center;
		justify-content: center;
		-webkit-box-align: center;
		align-items: center;
		flex-wrap: wrap-reverse;
		width: 45px;
		height: 45px;
		border-radius: 5px;
		border-color: #eee;
		border-width: 1px;
		border-style: solid;
		overflow: hidden;
	}

	.user__content {
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		flex-direction: row;
		-webkit-box-flex: 1;
		flex: 1;
		overflow: hidden;
		padding: 2px 0;
	}

	.user__content-main {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-box-pack: justify;
		-webkit-justify-content: space-between;
		justify-content: space-between;
		padding-left: 10px;
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		overflow: hidden;
	}

	.user__content-note {
		margin-top: 3px;
		color: #999;
		font-size: 12px;
		font-weight: normal;
		overflow: hidden;
	}

	.wb_hide_2 {
		display: -webkit-box;
		overflow: hidden;
		text-overflow: ellipsis;
		word-wrap: break-word;
		white-space: normal !important;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}